package com.github.niefy.modules.wx.handler;

import com.github.niefy.modules.wx.service.WxMassRecordService;
import com.github.niefy.modules.wx.service.WxMsgVerifyService;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.common.session.WxSessionManager;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * 接收到群发消息记录结果推送
 */
@Component
public class MsgRecordHandler extends AbstractHandler{
    @Autowired
    WxMassRecordService wxMassRecordService;
    @Autowired
    WxMsgVerifyService wxMsgVerifyService;

    @Override
    public WxMpXmlOutMessage handle(WxMpXmlMessage wxMpXmlMessage, Map<String, Object> map, WxMpService wxMpService, WxSessionManager wxSessionManager) throws WxErrorException {
        //1、从xml中获取群发消息记录，并保存到数据库
        //2、从xml中获取版权验证数据，并保存到数据库
        return null;
    }
}
